﻿using UnityEngine;
using System.Collections;

using UEngine;
public class TestCallLuaFuncWithParams : MonoBehaviour {

	// Use this for initialization
    public string path;
    public string module;
	void Start () 
    {
        LuaHolder luaHolder = new LuaHolder();
        luaHolder.luaScriptPath = path;
        luaHolder.luaScriptModuleName = module;
        luaHolder.Init();

        if (StringHelper.StringCompare(path, "Game/A_test/test.lua"))
        {
            object [] result1 = luaHolder.CallLuaFunction("DataFromCSharp", 100);
            object [] result2 = luaHolder.CallLuaFunction("DataFromCSharp", "fanzhengyong");
            object [] result3 = luaHolder.CallLuaFunction("DataFromCSharp2", 200, "fanzhengyong2");
            Debug.Log(result3[0] + "  " + result3[1]);
        }
        else
        {
            luaHolder.CallLuaFunction("test2", 100);
            luaHolder.UnInit();
        }




	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
